﻿using System.Configuration;

namespace Nana.Web.Compressing
{
  [ConfigurationCollection(typeof(CompressionFilterElement))]
  public class CompressionFilterCollection
    : ConfigurationElementCollection
  {
    public void Add(CompressionFilterElement element)
    {
      BaseAdd(element, true);
    }
    public void Clear()
    {
      BaseClear();
    }

    protected override ConfigurationElement CreateNewElement()
    {
      return new CompressionFilterElement();
    }
    protected override object GetElementKey(ConfigurationElement element)
    {
      return ((CompressionFilterElement)element).Name;
    }
    public int IndexOf(CompressionFilterElement element)
    {
      return BaseIndexOf(element);
    }

    public void Remove(string name)
    {
      BaseRemove(name);
    }
    public void Remove(CompressionFilterElement element)
    {
      BaseRemove(element.Name);
    }
    public void RemoveAt(int index)
    {
      BaseRemoveAt(index);
    }

  }
}
